/**
 * Copyright (C), 2019-2020, 宇信融汇
 * FileName: StringBufferDemo
 * Author:   xbliu
 * Date:     2020/7/1 16:48
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * xbliu           修改时间           版本号              描述
 */
package c_008.stringbufferdemo;

/**
 * @Classname StringBufferDemo
 * @Description TODO
 * @Date 2020/7/1 16:48
 * @Created by xbliu
 */
public class StringBufferDemo {

    public static void main(String[] args) {
//        StringBuffer stringBuffer = new StringBuffer();
//        stringBuffer.append("abc").append(false).append(1234).append(3.11);
//        System.out.println(stringBuffer.length());
//        System.out.println(stringBuffer.capacity());
//
//        System.out.println(stringBuffer);
//        System.out.println(stringBuffer.insert(0,2));
        String a = null;
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append(a);
        System.out.println(stringBuffer.length());
        System.out.println(stringBuffer);
        System.out.println("-----------------------------------------------");
        StringBuffer stringBuffer1 = new StringBuffer(a);
        System.out.println(stringBuffer1);
    }
}
